<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-10-18
 * Time: 13:59
 */
namespace app\manage\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class Notic extends Validate
{
    //定义验证规则
    protected $rule = [
        'title|公告标题'  => 'require',
        'status|展示状态'  => 'require',
        'content|新闻内容'   => 'require',
    ];

    //定义验证提示
    protected $message = [
        'title.require' => '请输入新闻标题',
        'status.require' => '请选择展示状态',
        'content.require' => '请输入新闻内容',

    ];

    //定义验证场景
    protected $scene = [
        //更新
        'update'  =>  ['title','content','status'],
    ];
}
